<!--错误页配置信息  TODO:thymeleaf如何自定义了路径？-->
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:fragment="head(title)">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title th:replace="${title}">标题</title>
    <link rel="stylesheet"
          href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
    <link rel="stylesheet" href="../static/css/common.css" th:href="@{/css/common.css}">
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
    <script src="../static/js/custom.js" th:src="@{/js/custom.js}"></script>
    <script src="../static/js/semantic.min.js" th:src="@{/js/semantic.min.js}"></script>
</head>
<body>

<!--导航-->
<nav id="nav" th:fragment="menu(index)" class="ui inverted attached segment head-tab-padding">
    <div class="ui container">
        <!--stackable 表示可堆叠，自适应-->
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui teal header item">博客</h2>
            <a class="menu-item item mobile-hide" href="#" th:href="@{/}"
               th:classappend="${index==0}?'active'"><i
                    class="teal code icon"></i>首页</a>
            <a class="menu-item item mobile-hide" href="#" th:href="@{/category/-1}"
               th:classappend="${index==1}?'active'"><i
                    class="teal idea icon"></i>分类</a>
            <a class="menu-item item mobile-hide" href="#" th:href="@{/tags/-1}"
               th:classappend="${index==2}?'active'"><i
                    class="teal tags icon"></i>标签</a>
            <a class="menu-item item mobile-hide" href="#" th:href="@{/history}"
               th:classappend="${index==3}?'active'"><i
                    class="teal time icon"></i>归档</a>
            <a class="menu-item item mobile-hide" href="#" th:href="@{/about}"
               th:classappend="${index==4}?'active'"><i
                    class="teal info icon"></i>关于我</a>
            <div class="menu-item right item mobile-hide">
                <form name="search" action="#" th:action="@{/search}" method="post">
                    <div class="ui icon transparent inverted input">
                        <input placeholder="搜索..." name="searchKey" type="text"
                               th:value="${searchKey}">
                        <i class="search link icon" onclick="document.forms['search'].submit()"></i>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <!--菜单按钮-->
    <a id="menu-toggle" class=" ui black icon button bar-position mobile-show" href="#">
        <i class="sidebar icon"></i>
    </a>
</nav>


<!--底部内容-->
<footer th:fragment="footer" class="ui inverted vertical segment foot-padding">
    <div class="ui center aligned container ">
        <!--grid  分割成 16份-->
        <div class="ui inverted divided stackable grid">
            <div class="three wide column">
                <div class="ui inverted link list">
                    <div class="item">
                        <img class="ui rounded image view-qr-width"
                             src="../static/img/me_wechat.png" alt=""
                             th:src="@{/img/me_wechat.png}"/>
                    </div>
                </div>
            </div>
            <div class="three wide column">
                <h4 class="text-opacity-eight text-space">最新博客</h4>
                <div id="new-blog-list">
                    <div th:fragment="newBlogList" class="ui inverted link list">
                        <a th:each="blog:${newBlogList}"
                           th:href="@{/blog/{id}(id=${blog.id})}"
                           th:text="${blog.title}"
                           class="item"
                           href="#"></a>
                        <!--/*-->
                        <a class="item" href="#">Android组件化开发...</a>
                        <a class="item" href="#">Activity生命周期详解...</a>
                        <a class="item" href="#">SpringBoot框架搭建...</a>
                        <!--*/-->
                    </div>
                </div>
            </div>
            <div class="three wide column">
                <h4 class="text-opacity-eight text-space">联系我</h4>
                <div class="ui inverted link list">
                    <a class="item" href="#">邮箱：wu_tangren@163.com</a>
                    <a class="item" href="#">QQ：996489865</a>
                    <div class="ui inverted">
                        <a href="https://github.com/wuxinxi" target="_blank"> <i class="teal github icon"></i></a>
                        <a href="https://blog.csdn.net/wu996489865" target="_blank"> <i class="teal blogger  icon"></i></a>
                    </div>
                </div>
            </div>
            <div class="seven wide column">
                <h4 class="text-opacity-eight text-space">简介</h4>
                <p class="text-opacity-six text-space">欢迎大家来到我的博客空间,我是唐人从事Android开发工作.</p>
            </div>
        </div>
        <div class="ui inverted  divider"></div>
        <p class="text-opacity-six text-space">Copyright © 2020 -
            <script>document.write(new Date().getFullYear())</script>
            <a  class="item" href="https://beian.miit.gov.cn/" target="_blank">粤ICP备19128252号</a>
            PersonalBlog Designed by
            TangRen
        </p>
    </div>
</footer>

</body>
</html>